package com.mdd.front.service.coupon;

import com.baomidou.mybatisplus.extension.service.IService;
import com.mdd.common.core.PageResult;
import com.mdd.common.entity.coupon.Coupon;
import com.mdd.front.validate.PageParam;
import com.mdd.front.vo.coupon.CouponListVo;
import com.mdd.front.vo.goods.GoodsDetailVo;

import java.util.List;
import java.util.Map;

public interface ICouponService extends IService<Coupon> {

	PageResult<CouponListVo> list(PageParam pageParam, Map<String, String> params);

	void receiveCoupon(Integer id, Integer userId);

	List<CouponListVo> goodsCoupon(Integer goodsId, Integer userId);

	void collectCoupon(String code, Integer userId);

	PageResult<CouponListVo> getUserCoupon( PageParam pageParam, Integer userId, Integer type);

	List<GoodsDetailVo> getGoodsByCouponId(Integer couponId);

	Coupon getCouponByCouponCode(String couponCode, Integer couponId);
}
